#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
long long fun(char a[], int n)
{
	int i = 1;
	long long count = 0;
	int j = 0;
	for (j=n-1; j >=0; j--)
	{
		if(a[j]!=0)
		count = count + i * (a[j] - 48);
		i *= 10;
	}
	return count;
}
int main()
{
	char p1[105] = { 0 };
	char p2[105] = {0};
	long long p3[100] = { 0 };
	long long p4[100] = { 0 };
	long long count[100] = { 0 };
	scanf("%s", p1);
	scanf("%s", p2);
	//printf("%s\n", p1);
	//printf("%s\n", p2);
	int j = 0;
	int k = 0;
	int i = 0;
	int i2 = 0;
	while (p1[j] != 0)
	{
		j++;
	}
	while (p2[k] != 0)
		k++;

	k--;
	j--;
	while (j >= 0)
	{
		char arr[5] = { 0 };
		int m = 0;
 		for (m = 0; m <  5; m++)
		{
			arr[4 - m] = p1[j - m];
			if (j-m <= 0)
				break;
			
		}
			p3[i] = fun(arr, 5);
		
		i++;
		if (m < 5)
			j--;
		
		j -= m;
	} 
	//printf("%d\n", j);

	/*if (p1[j] != 0)
	{

		p3[i] = p1[j] - 48;
		i++;
	}*/

	while (k >= 0)
	{
		char arr[5] = { 0 };
		int m = 0;
		for (m = 0; m <5; m++)
		{
			arr[4 - m] = p2[k - m];
			if (k-m <= 0)
				break;
			
		}
			p4[i2] = fun(arr, 5);
	
		i2++;
		if (m <5)
			k--;
		
		k -= m;
	}
	/*if (p2[k] != 0)
	{
		p4[i2] = p2[k] - 48;
		i2++;
	}*/
	int ct = 99;
	i2--;
	i--;
	int y = 0;
	int min = 0;
	for(y;y<=i2;y++) 
	{
		int a = 0;
		int b = y;
		int cf = ct;
		for (a; a <=i ; a++)
		{
			long long k = p3[a] * p4[b];
			count[cf] = count[cf] + k % 100000;
			int cf2 = cf;
			while (k != 0)
			{			
				count[cf2 - 1] = count[cf2 - 1] + k / 100000;
				k /= 100000;
				cf2--;
				
			}
			long long m = count[cf];
			int cf3 = cf;

			if (m/100000)
			{
				count[cf] = m % 100000;
					count[cf3 - 1] = count[cf3 - 1] + m / 100000;
					m /= 100000;
					cf3--;
					cf3--;
			}
			min = cf2 > cf3 ? cf3 : cf2;	
			cf--;
		}
       		ct--;
	}
	min++;
	int flag = 1;
	while (min < 100)
	{
		if (flag)
		{
			printf("%d", count[min]);
			flag = 0;
		}
		else
			printf("%05d", count[min]);

		min++;
	}

}